Semaphore implementation in rust taken from the previously deprecated std-semaphore
If you have two threads, executing the following:
| Thread A | Thread B |
Semaphore implementation in rust taken from the previously deprecated std-semaphore
If you have two threads, executing the following:
| Thread A | Thread B |
| #!/usr/bin/python | |
| from bcc import BPF | |
| from time import sleep | |
| # This outputs a count of how many times the clone and execve syscalls have been made | |
| # showing the use of an eBPF map (called syscall). | |
| program = """ | |
| BPF_HASH(syscall); |
| public class AnimatedActivity extends Activity | |
| { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) | |
| { | |
| super.onCreate(savedInstanceState); | |
| //opening transition animations | |
| overridePendingTransition(R.anim.activity_open_translate,R.anim.activity_close_scale); | |
| } |
Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
This Python script creates a git repo with your tweets. Obviously its limited by Twitter API limitations as you cannot retrieve more than 3200 tweets at a time.
Given the fact that Twitter doesn't give a fuck about our data, you may not find your old tweets ever again. So nothing is better than keeping an archive of tweets as a Git repo.
This is inspired by @holman's tweets repo. But this doesn't have a dependency on Madrox. Just plain Python and Git.
To create an archive of tweets initiate a git repo in a directory with git init. Then put the script in the directory and execute:
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>runner</title> | |
| <!-- WinJS references --> | |
| <link href="//Microsoft.WinJS.1.0/css/ui-dark.css" rel="stylesheet" /> | |
| <script src="//Microsoft.WinJS.1.0/js/base.js"></script> | |
| <script src="//Microsoft.WinJS.1.0/js/ui.js"></script> |
| (function () { | |
| "use strict"; | |
| var nav = WinJS.Navigation; | |
| function pin() { | |
| // This demo code comes from | |
| // http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.startscreen.secondarytile.aspx | |
| // Prepare package images for use as the Tile Logo and Small Logo in our tile to be pinned. |
| #include <stdbool.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| /* | |
| This is our integer linked list type (Null is an empty list) | |
| (it is immutable, note the consts) | |
| */ | |
| typedef struct IntList_s const * const IntList; |
| #include<iostream> | |
| using namespace std; | |
| #define odd(x) (x&1) | |
| #define even(x) (!(x&1)) | |
| int main(){ | |
| int x; | |
| cin >> x; |