Skip to content

Instantly share code, notes, and snippets.

HanWool Lee fregmented

Block or report user

Report or block fregmented

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View r.c
int main(int argc, char *argv[]) {
// BLAHBLAH
UART_eSetRTS(iUartFd, 1); // nRESET
UART_eSetDTR(iUartFd, 1); // nPROG
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 100000000; // 100 ms
nanosleep(&ts, NULL);
UART_eSetRTS(iUartFd, 0); // nRESET
ts.tv_sec = 0;
@fregmented
fregmented / skplanet_weather.py
Last active Feb 19, 2018
SK플래닛 Weather Planet에서 날씨정보 받아오는 파이썬 스크립트입니다. 기상청 AWS station명으로 분단위 실시간 기상정보를 받아옵니다.
View skplanet_weather.py
from requests import get
from enum import IntEnum
SK_PLANET_APP_KEY = "KEEEEEEY"
class Stations(IntEnum):
def __str__(self):
return "{}".format(self.value)
View switch
source
```
switch(integerA){
case 0:
method1();
case 1:
method2();
break;
default:
@fregmented
fregmented / AllSensorSample
Last active Nov 26, 2015
AllSensorSample.java
View AllSensorSample
private boolean isAmbient_temp = false;
private boolean isMagnetic = false;
private HashMap<Integer, float[]> sensorValues = new HashMap<>();
public void onSensorChanged(SensorEvent event) {
switch (event.sensor.getType()){
case Sensor.TYPE_AMBIENT_TEMPERATURE:
// blah blah
sensorValues.put(Sensor.TYPE_AMBIENT_TEMPERATURE, event.values);
isAmbient_temp = true;
break;
@fregmented
fregmented / stacktrace.java
Created Oct 3, 2015
Youtrack GitLab integration stacktrace
View stacktrace.java
16:03:50,474 WARN [TransactionalResourceFilter ] [tp1530388690-16] [HanWool@220.123.69.35] Can't commit rest transaction
jetbrains.youtrack.integration.github.rest.JerseyClientExceptionWrapper: javax.ws.rs.NotFoundException: HTTP 404 Not Found
at jetbrains.youtrack.integration.github.rest.BitBucketRest.post(BitBucketRest.java:201)
at jetbrains.youtrack.integration.github.rest.GitLabRest.createHook(GitLabRest.java:72)
at jetbrains.youtrack.integration.github.persistence.GitLabChangesProcessorImpl.doCreateHook(GitLabChangesProcessorImpl.java:38)
at jetbrains.youtrack.integration.github.persistence.GithubCloneChangesProcessorImpl.createHook(GithubCloneChangesProcessorImpl.java:74)
at jetbrains.youtrack.integration.github.persistence.GithubRepoChangesListener.addedSyncBeforeConstraints(GithubRepoChangesListener.java:26)
at jetbrains.teamsys.dnq.runtime.events.EventsMultiplexer.handleChange(EventsMultiplexer.java:297)
at jetbrains.teamsys.dnq.runtime.events.EventsMultiplexer.handlePerEntityTypeChanges(Ev
View gist:6726ee0fa4f9b816f061
seyrizui-Mac-mini:SUGARAIN seyriz$ ./gradlew --parallel --stacktrace assemble
Parallel execution is an incubating feature.
:app:preBuild
:xmlrpc:compileLint
:robotoCalendarLibrary:compileLint UP-TO-DATE
:robotoCalendarLibrary:copyReleaseLint
:app:preDebugBuild
:xmlrpc:copyReleaseLint UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:robotoCalendarLibrary:copyReleaseLint UP-TO-DATE
View gitlab.rb
## Url on which GitLab will be reachable.
## For more details on configuring external_url see:
## https://gitlab.com/gitlab-org/omnibus-gitlab/blob/629def0a7a26e7c2326566f0758d4a27857b52a3/README.md#configuring-the-external-url-for-gitlab
external_url ''
## Note: configuration settings below are optional.
## Uncomment and change the value.
############################
# gitlab.yml configuration #
View reverse-proxy
server {
listen 80;
server_name domain;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:[dest-post];
}
}
View Android Studio SSL Cert Fail
2015-04-12 02:34:11,229 [1765019] INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
2015-04-12 02:34:11,229 [1765019] INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
2015-04-12 02:34:11,230 [1765020] INFO - util.EmbeddedDistributionPaths - Looking for embedded Maven repo at '/Applications/Android Studio.app/Contents/gradle/m2repository'
2015-04-12 02:34:11,231 [1765021] INFO - .project.GradleExecutionHelper - Passing command-line args to Gradle Tooling API: [-Pandroid.injected.build.model.only=true, -Pandroid.injected.build.model.only.advanced=true, -Pandroid.injected.invoked.from.ide=true, --init-script, /private/var/folders/w0/pbg93bm92wq3n0__t0n3ynl00000gn/T/asLocalRepo2055788470259646157.gradle, --init-script, /private/var/folders/w0/pbg93bm92wq3n0__t0n3ynl00000gn/T/ijinit3434146205477802898.gradle]
2015-04-12 02:
View ?????
private synchronized void buildListsByPlaylist(){
ConcurrentMap<String, List<MediaMetadata>> newMusicListByPlaylist = new ConcurrentHashMap<>();
for(MutableMediaMetadata m : mMusicListById.values()){
String playlist = m.metadata.getString(CUSTOM_METADATA_PLAYLIST_NAME);
List<MediaMetadata> list = newMusicListByPlaylist.get(playlist);
Log.e("buildListsByPlaylist", playlist);
if(list == null){
list = new ArrayList<>();
newMusicListByPlaylist.put(playlist, list);
}
You can’t perform that action at this time.